package com.geek.service.impl;

import com.geek.mapper.MarketAdMapper;
import com.geek.model.MarketAd;
import com.geek.model.MarketAdExample;
import com.geek.service.AdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdServiceImpl implements AdService {
    @Autowired
    MarketAdMapper adMapper;
    @Override
    public List<MarketAd> query() {
        MarketAdExample example = new MarketAdExample();
        example.createCriteria().andDeletedEqualTo(false);
        example.setOrderByClause("add_time desc");
        return adMapper.selectByExample(example);
    }
}
